const express=require("express")
const router=express.Router()
const myArticleList=require("../service/myArticleList")
router.get("/myArticleList/:authorId",(req,res)=>{
    let authorId=req.params.authorId
    myArticleList(authorId).then(data=>{
        if(data==404){
            res.json({
                status:data,
                msg:"没找到"
            })
            res.end()
        }else{
            res.json({
                status:200,
                msg:data
            })
            res.end()
        }
    })
})
module.exports=router